/**
 * 
 */
package fr.upmc.alasca.centreCalcul.interne.machinePhysique.connectors;

import java.util.List;

import fr.upmc.alasca.centreCalcul.interne.machinePhysique.interfaces.MachinePhysiqueApplicationI;
import fr.upmc.components.connectors.AbstractConnector;


/**
 * @author Antoine Lavaire, Sabri Labassi, Thibaut Fleury, Ryme Fantazi
 */
public	class	MachinePhysiqueApplicationConnector
extends			AbstractConnector
implements		MachinePhysiqueApplicationI
{
	

	/**
	 * @see fr.upmc.alasca.centreCalcul.interne.machinePhysique.interfaces.MachinePhysiqueAdmissionI#reserverCoeur(java.lang.String, int)
	 */
	@Override
	public	int		reserverCoeur
	(
			String	uriApplication,
			int		nbCoeursAReserver
	) throws	Exception
	{
		return ((MachinePhysiqueApplicationI)this.offering).reserverCoeur(
				uriApplication, nbCoeursAReserver);
	}
	
	
	/**
	 * @see fr.upmc.alasca.centreCalcul.interne.machinePhysique.interfaces.MachinePhysiqueAdmissionI#relacherCoeur(java.lang.String, int)
	 */
	@Override
	public	void	relacherCoeur
	(
			String	uriApplication,
			List<String> uriCoeurs
	) throws	Exception {
		((MachinePhysiqueApplicationI)this.offering).relacherCoeur(
				uriApplication, uriCoeurs);
	}

	
	/**
	 * @see fr.upmc.alasca.centreCalcul.interne.machinePhysique.interfaces.MachinePhysiqueApplicationI#recupererMV(java.lang.String)
	 */
	@Override
	public	String	recupererMV
	(
			String	uriApplication
	) throws	Exception
	{
		return ((MachinePhysiqueApplicationI)this.offering).recupererMV(
				uriApplication);
	}

	
	/**
	 * @see fr.upmc.alasca.centreCalcul.interne.machinePhysique.interfaces.MachinePhysiqueApplicationI#modifierFrequenceCoeurs(java.lang.String, float)
	 */
	@Override
	public float	appliquerNouvelleFrequence
	(
			String	uriApplication
	) throws	Exception
	{
		return ((MachinePhysiqueApplicationI)this.offering).appliquerNouvelleFrequence(
				uriApplication);
	}


	@Override
	public	void	allouerCoeurs(String uriApplication) throws Exception {
		((MachinePhysiqueApplicationI)this.offering).allouerCoeurs(uriApplication);
	}


	@Override
	public boolean reserverNouvelleFrequence(String uriApplication,
			String uriCoeur, float nouvelleFrequence) throws Exception {
		return ((MachinePhysiqueApplicationI)this.offering).
				reserverNouvelleFrequence(
						uriApplication, uriCoeur, nouvelleFrequence);
	}


	@Override
	public void shutdownApplication(String uriApplication) throws Exception {
		((MachinePhysiqueApplicationI)this.offering).shutdownApplication(uriApplication);
	}

}
